package com.jisu.controller;

import com.jisu.feign.CarFeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {

    private final CarFeignClient carClient;

    public HelloController(CarFeignClient carClient) {
        this.carClient = carClient;
    }

    @GetMapping("/getCarInfo")
    public String hello() {
        return carClient.getCarInfo("123"); // 调用远程服务
    }
}
